//
//  NoteNoTableViewCell.m
//  SmileRead
//
//  Created by dllo on 15/8/31.
//  Copyright (c) 2015年 JIZ. All rights reserved.
//

#import "NoteNoTableViewCell.h"

@interface NoteNoTableViewCell ()

@property (nonatomic, retain) UILabel *dateLabel;
@property (nonatomic, retain) UILabel *noteLabel;


@end


@implementation NoteNoTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
        self.dateLabel = [[UILabel alloc] init];
        [self.contentView addSubview:self.dateLabel];
        [_dateLabel release];
        
        self.noteLabel = [[UILabel alloc] init];
        [self.contentView addSubview:self.noteLabel];
        [_noteLabel release];
        
    }
    return self;
}

- (void)layoutSubviews
{
    [super layoutSubviews];
    
    self.noteLabel.frame = CGRectMake(10 * widthFit, 30 * heightFit, self.contentView.frame.size.width - 20 * widthFit, 90 * heightFit);
    self.noteLabel.numberOfLines = 0;
    //self.noteLabel.backgroundColor = [UIColor cyanColor];
    
    self.dateLabel.frame = CGRectMake(10 * widthFit, 0 * heightFit, self.contentView.frame.size.width - 20 * widthFit, 30 * heightFit);
    //self.dateLabel.backgroundColor = [UIColor redColor];
    
}

- (void)receiveNote:(NSString *)note date:(NSString *)date
{
    self.noteLabel.text = note;
    self.dateLabel.text = date;
}



- (void)dealloc
{
    [_dateLabel release];
    [_noteLabel release];
    [super dealloc];
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
